<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>下拉选择框select</title>
    <script src="http://cdn.static.runoob.com/libs/angular.js/1.4.6/angular.min.js"></script>
</head>
<body>
    <div ng-app="">
        <p ng-init="name1=['a','b','c']">
            <select ng-model="selected1" ng-options="x for x in name1"></select>
            <br/><b>你选择的是：</b>{{selected1}}
        </p>
        <p ng-init="name2=['a','b']">
            <select ng-model="selected2">
                <option ng-repeat="x in name2">{{x}}</option>
            </select>
            <br/><b>你选择的是：</b>{{selected2}}
        </p>
        <h2>方式三：</h2>
        <p data-ng-init=' sites=[{site : "Google", url : "http://www.google.com"},{site : "Runoob", url : "http://www.runoob.com"},{site : "Taobao", url : "http://www.taobao.com"}]'>
            <select ng-model="select3" ng-options="x.site for x in sites">
            </select>
            <br/><b>你选择的是：</b>{{select3.site}}
            <br/><b>你选择的是：</b>{{select3.url}}
        </p>
        <h2>方式四：</h2>
        <p data-ng-init='cars = {car01 : {brand : "Ford", model : "Mustang", color : "red"},car02 : {brand : "Fiat", model : "500", color : "white"},car03 : {brand : "Volvo", model : "XC90", color : "black"}}'>
            <select ng-model="selected4" ng-options="x for (x,y) in cars"></select>
            <br/><b>你选择的是：</b>{{selected4}}
            <br/><b>你选择的brand是：</b>{{selected4.brand}}
            <br/><b>你选择的color是：</b>{{selected4.color}}
        </p>
    </div>
</body>
</html>